<?php
/*
Template Name: Business Partners
*/
if($_GET['logout']==true) {
    wp_clear_auth_cookie();
    //do_action('wp_logout');
    wp_redirect_to('/businesspartners',0);
}
if($_POST['log']!=''){
    $creds = array();
    $creds['user_login'] = $_POST['log'];
    $creds['user_password'] = $_POST['pwd'];
    $creds['remember'] = ($_POST['rememberme'])?true:false;
    $user = wp_signon( $creds, false );
    //print_r($user);
    if ( is_wp_error($user) ) {
        $error_ = 'ERROR:<br />- Invalid username.<br />- The password you entered for the username "'.$_POST['log'].'" is incorrect.';
    }else {
        wp_redirect_to('/businesspartners',0);
    }
}  

get_header(); ?>
		<div id="primary" class="pagedefault business-partner">
			<div id="content" role="main" class="clearfix">
                <div class="leftpage aleft">                
                	<img src="<?php echo get_template_directory_uri(); ?>/images/business-partner.png" />
                    <?php 
                    global $current_user;
                    get_currentuserinfo();                    
                    
                    if($current_user->ID <=0 )
                        wp_nav_menu( array( 'menu' => 'business-menu1','menu_class'=>'pagemenu' ) ); 
                    else   
                        wp_nav_menu( array( 'menu' => 'business-menu2','menu_class'=>'pagemenu' ) );
                    ?>
                   
                </div><!--/.leftpage-->                
                <div class="centerpage aleft">
                    <img src="<?php echo get_template_directory_uri(); ?>/images/business-partner-banner.png" />                      
                       <?php 
                      
                        while ( have_posts() ) : the_post();
				           the_content();
			            endwhile; // end of the loop. 
                        
                        ?>
                </div><!--/.centerpage-->
			</div><!-- #content -->
		</div><!-- #primary -->

<?php get_footer(); ?>